<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .grid-container {
      /* 网格布局 */
      display: grid;
      width: 800px;
      margin: 100px auto;
      /* 定义行 及网格线名称 */
      grid-template-rows: [a1] 200px [a2];
      /* 定义列 及网格线名称 */
      grid-template-columns: [b1] 150px [b2] 200px [b3] auto [b4];
    }
    .grid-item:nth-child(1) {
      background-color: skyblue;
    }
    .grid-item:nth-child(2) {
      background-color: pink;
    }
    .grid-item:nth-child(3) {
      background-color: khaki;
    }
  </style>
<body>
    <!-- 
        TIP
        grid-template-columns属性和grid-template-rows属性里面，还可以使用方括号，指定每一根网格线的名字，方便以后的引用。
    -->

    <div class="grid-container">
        <div class="grid-item">1</div>
        <div class="grid-item">2</div>
        <div class="grid-item">3</div>
      </div>
</body>
</html>